#ifndef CVIRENDER_H_INCLUDED
#define CVIRENDER_H_INCLUDED

//predecl
namespace cvRenderInterface
{	class IRenderer;
	class Renderinglayer;
	class RenderableLine;
};

//includes
#include <ObjectSubSystem/BaseCameraObject.h>
#include "cvIPrimitives.h"

/**
 *	non-rendering mode specific stuff goes to cvRenderInterface namespace. */
namespace cvRenderInterface
{
	/**
	 *	Render interface */
	class IRenderer
	{
		public:
			virtual ~IRenderer();

			/**
			 *	Selects the rendering layer */
			virtual void setScene(Renderinglayer * layer) =0;

			/// The active scene that holds all data for render() phase.
			static Renderinglayer * getActiveLayer();

			/// Select the default camera used in rendering.
			virtual void setActiveCamera( cvObjects::BaseCameraObject * cam ) =0;
			static cvObjects::BaseCameraObject * getActiveCamera();

			// global primitive drawing colour
			static RGBAf DrawColour;
			// global buffer clear colour
			static RGBAf ClsColour;

			/**
			  *	#7 Renders selected layer at the active camera view.
			  */
			virtual void render() =0;


			/**
			 * #2 Renderer objects
			 */
			 virtual RenderableLine * createLine() =0;
			 //virtual RenderableLine * createTris() =0;
			 //virtual RenderableLine * createQuad() =0;
			 //virtual RenderableLine * createCircle() =0;
			 //virtual RenderableLine * createSprite() =0;

		protected:
			static Renderinglayer * m_activelayer;
			static cvObjects::BaseCameraObject * m_activecamera;

	};
};
#endif // CVRENDER_H_INCLUDED
